﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApplication1.Websert
{
    public partial class WebForm2 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session ["Name"]==null )
            {
                Response.Redirect("WebForm1.aspx");
            }
            else
            {
                Literal1.Text = "欢迎" + Session["Name"].ToString()+",想要的这里都可以搜到！";
                Response.Write($"访问人数：{Application["visiting"]},历史总访问人数:{Application["visitcount"]}个");
            }
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            Session.Abandon();
            Response.Redirect("WebForm1.aspx");
        }
    }
}